
include ../Makefile.Res
Version:=5.4.1
ModuleName:=net-snmp

Object:=snmp.tgz
ObjectDir:=$(ModuleName)-$(Version)
ObjectSource:=$(ModuleName)-$(Version).tar.gz

DependFiles:=

ExtModuleNames:=

InstallDir:=/usr/local/net-snmp

Config:=--prefix=$(InstallDir) --disable-manuals \
	--with-defaults  --with-transports="UDP TCP" \
	--disable-embedded-perl --without-root-access
	#--disable-shared --disable-FEATURE --without-PACKAGE

.PHONY: all clean dist_clean

all:$(Object) 

$(Object):$(ObjectSource) 
	tar -xzf $(ObjectSource)
	rm etc -rf; mkdir etc/snmp -p; cp snmpd.conf snmptrapd.conf etc/snmp/ -rf
	cd $(ObjectDir);./configure $(Config)
	$(MAKE) -C $(ObjectDir)
	$(MAKE) -C $(ObjectDir) install DESTDIR=`pwd`/
	rm -rf usr/local/share usr/local/man  usr/local/net-snmp/man usr/local/net-snmp/include 
	$(g_STRIP)
	tar -czf $(Object) usr etc

clean:
	rm -rf $(Object) usr etc

dist_clean:clean
	rm -rf $(ObjectDir) $(ObjectSource) *.tar.gz
	
